package day007.api_Integer;

public class IntegerDemo02 {
    public static void main(String[] args) {
        // int--string

        //方式一
        int number = 100;
        String s1 = number + "";
        System.out.println(s1);

        //方式二
        String s2 = String.valueOf(number);
        System.out.println(s2);

        //string--int

        //方式一
        String s = "100";
        Integer i = Integer.valueOf(s);
        int x = i.intValue();
        System.out.println(x);

        //方式二
        int y = Integer.parseInt(s);
        System.out.println(y);
    }
}
